var Ajax = require('../helper/superagent');
var Host = require('../config/host');
var Url = require('../config/url');

var BidInfo = {};
BidInfo.getAggregatedBidDetail = function (bidId, auth) {
  return Ajax.request('post', Host.p2p, Url.getAggregatedBidDetail, auth)
    .send({
      bidId: bidId
    });
}

BidInfo.queryPerfectHkjh = function (bidId, auth){
  return Ajax.request('post', Host.p2p, Url.queryPerfectHkjh, auth)
    .send({
      bidId: bidId
    });
}

BidInfo.queryRecommendedBidDetail = function(data, auth){
  return Ajax.request('post', Host.p2p, Url.queryRecommendedBidDetail, auth)
    .send(data)
}

BidInfo.getAgreementTemplate = function(bidId, auth){
  return Ajax.request('post', Host.p2p, Url.getAgreementTemplate, auth)
    .send({
      bidId: bidId
    });
}

BidInfo.getProductInstructions = function(bidId, auth){
  return Ajax.request('post', Host.p2p, Url.getProductInstructions, auth)
    .send({
      bidId: bidId
    });
}

module.exports = BidInfo;